package com.soo.hoo.admin.service.impl;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.soo.hoo.admin.mapper.SysBookCoverMapper;
import com.soo.hoo.admin.model.entity.SysBookCover;
import com.soo.hoo.admin.model.vo.BookCoverVO;
import com.soo.hoo.admin.service.BookCoverService;
import com.soo.hoo.core.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

/**
 * <p>
 * 礼簿封面图片 服务实现类
 * </p>
 *
 * @author 杨燚
 * @since 2024-04-29
 */
@Service
public class BookCoverServiceImpl extends ServiceImpl<SysBookCoverMapper, SysBookCover> implements BookCoverService {


    @Override
    public Map<Long, SysBookCover> getBookCoverMap(List<Long> ids) {
        List<SysBookCover> list = baseMapper.selectList(Wrappers.emptyWrapper());
        return list.stream().collect(Collectors.toMap(SysBookCover::getId, x -> x));
    }
}
